//
//  PayAndQRCController.h
//  MBObjectServer
//
//  Created by WorkSpace on 4/4/14.
//  Copyright (c) 2014 MBpayer. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "MBBaseServer.h"
#import "EPOSBankEntityResult.h"
#import "EPOSBankEntity.h"

#import "EPOSBillHeadInfo.h"
#import "DiscountMesModel.h"
#import "EPOSCcCouponCardInfo.h"

#import "PayItemCash.h"
@interface PayAndQRCController : NSObject
{
    EPOSBankEntityResult* bankEntityResult;
    EPOSBankEntity *bankEntity;
    
    EPOSBillHeadInfo * billheadinfo;
    
    PayItemCash * payitem_Cash;
    PayItemCash * payitem_Card;
    PayItemCash * payitem_Voucher;
    PayItemCash * payitem_CashVouc;
    
    NSDictionary *payViewData;

}


typedef  void (^ReceiveFailure) (NSError *error);

//生成二维码
typedef  void (^ReceiveSuccessQRC) (EPOSBankEntityResult *qrcReceiveDataResult ,EPOSBankEntity *qrcReceiveData);
//结算
typedef  void (^ReceiveSuccessPay) (NSDictionary *payReceiveDataResult);
//save接口
typedef  void (^ReceiveSuccessSave) (NSMutableDictionary *saveReceiveDataResult);

-(void)PayRequest:(NSString *)type
           Amount:(NSNumber *)amount
          Success:(ReceiveSuccessQRC)receiveSuccessQRC
          Failure:(ReceiveFailure)processFailure;

-(void)DymicCalcActSaleObjs:(NSMutableArray *)billSaleDetails
          ShopCarArrayCount:(NSNumber *)shopCarArrayCount
                     SumPay:(int)sumPay
              DiscountModel:(DiscountMesModel *)discountModel
                  LocalTime:(NSString *)localTime
            CouponCardModel:(EPOSCcCouponCardInfo *)couponCardModel
                    Success:(ReceiveSuccessPay)receiveSuccessPay
                    Failure:(ReceiveFailure)processFailure;

-(void)Save:    (NSMutableDictionary *)receiveJson
CouponCardModel:(EPOSCcCouponCardInfo *)couponCardModel
 bankEntitySave:(EPOSBankEntity*)bankEntitySave
        Success:(ReceiveSuccessSave)receiveSuccessSave
        Failure:(ReceiveFailure)processFailure;
@end
